//package person.learn.service.impl;
//
//import com.alibaba.fastjson.JSONObject;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.jms.core.JmsMessagingTemplate;
//import org.springframework.stereotype.Service;
//import person.learn.entity.Teacher;
//import person.learn.service.ActiveMQClientService;
//
///**
// * Created by barton on 16-2-1.
// */
//@Service
//public class ActiveMQClientServiceImpl implements ActiveMQClientService {
//
//    private static final String SAMPLE_QUEUE = "sample.queue";
//
//    private JmsMessagingTemplate jmsMessagingTemplate;
//
//    @Autowired
//    public ActiveMQClientServiceImpl(JmsMessagingTemplate jmsMessagingTemplate) {
//        this.jmsMessagingTemplate = jmsMessagingTemplate;
//    }
//
//    @Override
//    public void addTeacher(JSONObject teacher) {
//        jmsMessagingTemplate.convertAndSend(SAMPLE_QUEUE, teacher);
//    }
//
//    @Override
//    public void send(String msg) {
//        jmsMessagingTemplate.convertAndSend(SAMPLE_QUEUE, msg);
//    }
//}
